<?php
	include_once "xAP-functions/webincludes.php";


$id=intval($_GET["id"]);
	$sql="select a.Alias,s.StoryID,s.DateStamp,s.Title,s.URL,s.Body,s.TagList,a.SourceID from 
			xAP_News_Story as s  INNER JOIN  xAP_News_Source as a ON
			a.SourceID=s.SourceID
			where s.StoryID='".$id."' ";

		
$results=dbquery($sql);
$v=$results[0];

$q="?";
header("Content-type: text/xml");
?>
<<?=$q?>xml version="1.0" encoding="UTF-8"?>
<root>
<title set="waNewsStory"><?=$v["Alias"]?></title>
<part>
<destination mode="replace" zone="waNewsStory"  create="true"/>
<data><![CDATA[
<div class="iBlock">
<h1><?=$v["Title"]?></h1>
<p>
<?=strip_tags($v["Body"])?>
</p>
</div>
]]></data>
</part>
</root>